// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 获取日志列表 */
export async function getLogsList(params: API.PageParams) {
  return request('/api/logs', {
    method: 'GET',
    params,
  });
}

/** 新增日志 */
export async function addLogs(data: API.Logs.AddLog) {
  return request('/api/logs/add', {
    method: 'POST',
    data,
  });
}

/** 获取登陆日志列表 */
export async function getLoginLogs(params: API.PageParams & { user_id?: number }) {
  return request('/api/loginLogs', {
    method: 'GET',
    params,
  });
}
